/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import type.ProductionType;

/**
 *
 * @author wei
 */
@Entity(name="MasterProductionScheduleDaily")
public class MasterProductionScheduleDailyEntity extends DataObjectEntity implements Serializable {
    private int yearOfProduction;
    private int dayofProduction;
    private double changeOverTime;
    private ProductionType productionType;
    
    private long classicNuts;
    private long classicFruits;
    private long premiumNuts;
    private long premiumFruits;
    
    private double capacityNormal;
    private double capacityOverTime;
    private double utilizationNormal;
    private double utilizationOverTime;
    
    private double reservedCapacity;
    
    @ManyToOne
    private MasterProductionScheduleMonthlyEntity mpsMonthly;
    @ManyToOne
    private MasterProductionScheduleWeeklyEntity mpsWeekly;
    
    @OneToMany(cascade=CascadeType.ALL, mappedBy="mpsDaily")
    private Collection<ProductPercentageQuantityEntity> breakdownByProduct = new ArrayList<ProductPercentageQuantityEntity>();

    public MasterProductionScheduleDailyEntity() {
        super();
        setReservedCapacity(0);
    }

    public Collection<ProductPercentageQuantityEntity> getBreakdownByProduct() {
        return breakdownByProduct;
    }

    public void setBreakdownByProduct(Collection<ProductPercentageQuantityEntity> breakdownByProduct) {
        this.breakdownByProduct = breakdownByProduct;
    }

    public int getDayofProduction() {
        return dayofProduction;
    }

    public void setDayofProduction(int dayofProduction) {
        this.dayofProduction = dayofProduction;
    }

    public MasterProductionScheduleMonthlyEntity getMpsMonthly() {
        return mpsMonthly;
    }

    public void setMpsMonthly(MasterProductionScheduleMonthlyEntity mpsMonthly) {
        this.mpsMonthly = mpsMonthly;
    }

    public int getYearOfProduction() {
        return yearOfProduction;
    }

    public void setYearOfProduction(int yearOfProduction) {
        this.yearOfProduction = yearOfProduction;
    }

    @Override
    public String childToString() {
        return "MasterProductionScheduleDailyEntity{" + "yearOfProduction=" + yearOfProduction + ", dayofProduction=" + dayofProduction + ", mpsMonthly=" + mpsMonthly + ", breakdownByProduct=" + breakdownByProduct + '}';
    }

    public double getChangeOverTime() {
        return changeOverTime;
    }

    public void setChangeOverTime(double changeOverTime) {
        this.changeOverTime = changeOverTime;
    }

    public ProductionType getProductionType() {
        return productionType;
    }

    public void setProductionType(ProductionType productionType) {
        this.productionType = productionType;
    }

    public MasterProductionScheduleWeeklyEntity getMpsWeekly() {
        return mpsWeekly;
    }

    public void setMpsWeekly(MasterProductionScheduleWeeklyEntity mpsWeekly) {
        this.mpsWeekly = mpsWeekly;
    }

    public double getUtilizationNormal() {
        return utilizationNormal;
    }

    public void setUtilizationNormal(double utilizationNormal) {
        this.utilizationNormal = utilizationNormal;
    }

    public double getUtilizationOverTime() {
        return utilizationOverTime;
    }

    public void setUtilizationOverTime(double utilizationOverTime) {
        this.utilizationOverTime = utilizationOverTime;
    }

    public long getClassicNuts() {
        return classicNuts;
    }

    public void setClassicNuts(long classicNuts) {
        this.classicNuts = classicNuts;
    }

    public long getClassicFruits() {
        return classicFruits;
    }

    public void setClassicFruits(long classicFruits) {
        this.classicFruits = classicFruits;
    }

    public long getPremiumNuts() {
        return premiumNuts;
    }

    public void setPremiumNuts(long premiumNuts) {
        this.premiumNuts = premiumNuts;
    }

    public long getPremiumFruits() {
        return premiumFruits;
    }

    public void setPremiumFruits(long premiumFruits) {
        this.premiumFruits = premiumFruits;
    }

    public double getCapacityNormal() {
        return capacityNormal;
    }

    public void setCapacityNormal(double capacityNormal) {
        this.capacityNormal = capacityNormal;
    }

    public double getCapacityOverTime() {
        return capacityOverTime;
    }

    public void setCapacityOverTime(double capacityOverTime) {
        this.capacityOverTime = capacityOverTime;
    }

    public double getReservedCapacity() {
        return reservedCapacity;
    }

    public void setReservedCapacity(double reservedCapacity) {
        this.reservedCapacity = reservedCapacity;
    }
    
}
